//Eg8-6.cpp
#include<iostream>
using namespace std;
void Errhandler(int n)throw()
{
    try
	{
        if(n==1) throw n;
        if(n==2) throw "dx";
        if(n==3) throw 1.1;
    }
    catch(...)
	{
		cout<<"catch an exception..."<<endl;
	}
}
void main()
{
    Errhandler(1);
    Errhandler(2);
    Errhandler(3);
}


